package com.tianjian.myblog.exception;

import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;

/**
 * 自定义异常类，处理资源找不到的错误
 */

//注释的含义是把这一类自定义错误归类到spring boot 中的NOT_FOUND中去，从而直接跳转到404页面。也可以不被全局error拦截
@ResponseStatus(HttpStatus.NOT_FOUND)
public class NotFoundException extends RuntimeException {


    public NotFoundException() {
    }

    public NotFoundException(String message) {
        super(message);
    }

    public NotFoundException(String message, Throwable cause) {
        super(message, cause);
    }
}
